package CaCoC;



import java.util.ArrayList;
import java.util.Collection;


public class Medicines {
 public Collection<String> medicines;
 public boolean change;

	public Medicines(){
		this.medicines = new ArrayList<String>();
	}
	
	public Medicines(Collection<String> medicines){ 
		this.medicines=medicines;
		//this.change=change;
	}
	
	public void setChange(boolean change) {
		this.change = change;
	}
	

	public boolean getChange() {
		return change;
	}

	public Medicines(boolean change){
		this.medicines = new ArrayList<String>();
		this.change=change;
	}
	
	public boolean isChange() {
		return change=true;
	}
	
	

	public void setChanged(boolean change) {
		this.change = change;
	}
	

	public Collection<String> getMedicines() {
		return medicines;
	}
	
	public void setMedicines(Collection<String> medicines) {
	    this.medicines = medicines;
	}
	
	public void removeFromMedicines (String medicine) {
		medicines.remove(medicine);
	}
	
	public void addToMedicines(String medicine) {
		medicines.add(medicine);
		
	}
	
	public boolean inMedicines(String medicine) {
		if (medicines.contains(medicine))
			return true;
		else
			return false;
	} 
	
	public String toString() {
		return medicines+",";
	}

}
